package com.webchat.ugc.mongodb.service;


import com.webchat.ugc.mongodb.document.MallChatMessage;
import com.webchat.ugc.mongodb.inter.IMallChatMessageRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MallChatMsgMongoService extends AbstractMongoService<MallChatMessage> {

    @Autowired
    private IMallChatMessageRepository mallChatMessageRepository;

    @Override
    protected Class<MallChatMessage> getEntityClass() {

        return MallChatMessage.class;
    }

    /**
     * 保存客服对话消息
     *
     * @param chatMessage
     * @return
     */
    public MallChatMessage saveChatMessage(MallChatMessage chatMessage) {

        return mallChatMessageRepository.save(chatMessage);
    }
}
